package com.iris.live.services.data.repositories;


import com.iris.live.services.data.models.TPrdSupplierMailSettingModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by xiO on 2016/12/19.
 */
public interface TPrdSupplierMailSettingRepository extends JpaRepository<TPrdSupplierMailSettingModel, Integer>, JpaSpecificationExecutor<TPrdSupplierMailSettingModel> {

    @Query("select u from TPrdSupplierMailSettingModel u WHERE u.supplierId=?1 and u.productId=?2 ")
    TPrdSupplierMailSettingModel getModelByProductIdAndSupplieId(String supplierId, int pid);


}
